package Chapter02;
import java.util.Scanner;
public class zuoye2 {
    //2.已知1英寸(in)=2.54厘米(cm)。输入英寸数，转换成厘米，并输出
    public static void main(String[] args) {
        Scanner input =new Scanner(System.in);
        double inch=2.54,sum;
        System.out.println("请输入英寸数:");
        int centimeter=input.nextInt();
        sum=inch*centimeter;
        System.out.println("你输入的是"+centimeter+"英寸数,转换为:"+sum+"厘米。");


    }
}
